The present invention relates to a data exchange unit for transferring data, commands and so on in packets from a computer to a peripheral device such as optical disk drive, or vice versa, over a communication line.
In recent years, a telecommunications system complying with the IEEE 1394 standard has attracted much attention as a digital interface for interconnecting together audiovisual (AV) and computer components. The IEEE 1394 system is applicable to communicating not only between computer components, but also between AV components. This is because the IEEE 1394 standard defines both asynchronous and isochronous communications techniques alike. The asynchronous communications technique is applied to transferring computer data, for example, which does not always have to be transmitted in real time but must be highly accurate and reliable. On the other hand, the isochronous communications technique is applied to transferring AV data of a moving picture, for example, from which not so much reliability as real-time transmission is demanded more strongly. Thus, generally speaking, the asynchronous communications technique is preferred in writing computer data on an optical disk drive or reading computer data already recorded from the optical disk drive in accordance with the IEEE 1394 standard, for example. As for communications protocols defined for asynchronous communication between an initiator and a target, Serial Bus Protocol-2 (SBP-2) is under deliberation at the American National Standards Institute (ANSI). The SBP-2 standard defines various task management commands such as Login, QueryLogin and AbortTask.
A conventional data exchange unit in accordance with the IEEE 1394 standard includes buffers exclusively used for transmission and reception (in this specification, these buffers will be called xe2x80x9ctransmission bufferxe2x80x9d and xe2x80x9creception bufferxe2x80x9d, respectively). The size of each of these buffers is usually equal to the size of a maximum transferable packet. First-in-first-out buffers (FIFOs) implemented as these buffers are called xe2x80x9casynchronous transmission FIFO buffer (ATF)xe2x80x9d and xe2x80x9casynchronous reception FIFO buffer (ARF)xe2x80x9d, respectively. Suppose an initiator has issued a request packet during the transfer of data in order to issue QueryLogin as a task management command. In such a situation, if every packet received is stored on the ARF on the target (or on the receiving end), then the type of the packet received must always be checked to perform appropriate processing thereon. More specifically, it is necessary to know whether the packet includes a task management command or whether the packet is a response packet including data responding to a request packet responsive to a READ command. Accordingly, a central processing unit (CPU) must always determine the type of the packet that has been stored on the ARF, thus adversely increasing the overhead and taking a long time to transfer required data.
In addition, the sizes of the ATF and ARF are both equal to the size of a maximum transferable packet. Therefore, when a READ command is executed, data of a next packet cannot be written onto the ATF until a data transfer transaction is finished considering a situation where a retry is requested. Thus, it takes an even longer time to transfer required data.
An object of the present invention is providing a data exchange unit, which can reduce the overhead needed in transferring data.
To achieve this object, an inventive data exchange unit is adapted to communicate with a counterpart unit through a transmission line using, as a unit, a packet including header and data fields. The data exchange unit includes transmission buffer, reception buffer, transmission-reception buffer, transmission filter, reception filter, packet processor and transceiver. The transmission filter selectively stores a packet to be transmitted on either the transmission buffer or the transmission-reception buffer depending on the contents of the packet to be transmitted. The reception filter selectively stores a received packet on either the reception buffer or the transmission-reception buffer depending on the contents of the received packet. The packet processor makes a packet containing information to be transmitted or fetches necessary information from the received packet. The transceiver converts the packet that has been stored on the transmission buffer or the transmission-reception buffer into an electrical signal to be transmitted through the transmission line or converts another electrical signal received through the transmission line into the packet that will be stored on the reception buffer or the transmission-reception buffer. The capacity of the transmission-reception buffer is preferably twice as large as the size of a maximum transferable packet.